package com.g5.edu.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class RegisterVo implements Serializable {
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = ".{2,20}$",message ="用户名为2~20个字符")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^\\w{6,20}$",message = "密码是6~20个字符")
    private String password;

    @NotBlank(message = "确认密码不能为空")
    private String confirm;

    @NotBlank(message = "邮箱不能为空")
    private String email;
}
